import { Context, Next } from 'koa'
import UserService from '../services/user'

class UserController {
  async testApi(ctx: Context, next: Next) {
    const { phone } = ctx.query as { phone: string }

    const userInfo = await UserService.create(phone)
    ctx.body = userInfo

    return next()
  }
}
export default new UserController()
